package com.scy.java.thread;

public class RunnableTest {
    public static void main(String[] args) {
        //创建自定义线程对象
        MyRunnable mr = new MyRunnable();
        MyRunnable mr1 = new MyRunnable();
        //启动线程mr
        Thread thread = new Thread(mr, "黄河");
        thread.start();
        //启动线程mr1
        Thread thread1 = new Thread(mr1, "高原");
        thread1.start();
        //使用for循环执行主程序
        for (int i = 0; i < 5; i++) {
            System.out.println("main 线程"+i);
        }
    }
}
